#include<stdio.h>
#include<string.h>
#include<stdlib.h>

int main(int argc,char* argv[])
{
    
    if(argc!=2)
    {
        printf("参数错误：%s\n",argv[0]);
        return 1;
    }
    
    FILE* fp = fopen(argv[1],"r");

    if(fp==NULL)
    {
        perror("fopen:");
        return 2;
    }

 //   const char* s1 = "test:fwrite\n";
 //   const char* t1="12345";

   // fwrite(s1,strlen(s1),1,fp);
    //fwrite(t1,strlen(s1),1,fp);
    char line[64];
    while(fgets(line,sizeof line,fp)!=NULL)
        printf("%s",line);


    fclose(fp);

    return 0;
}
